﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService
{
    public interface ISoupTaskService
    {
        /// <summary>
        /// 任务列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<soup_task_dto> GetSoupTasks(SoupTaskQuery query);

        /// <summary>
        /// 获得任务
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        soup_task_dto GetSoupTask(long id);

        /// <summary>
        /// 新增任务
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        ResultMessage<int> AddSoupTask(soup_task_dto dto);

        /// <summary>
        /// 更新任务
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        ResultMessage<int> UpdateSoupTask(soup_task_dto dto);

        /// <summary>
        /// 删除任务
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteSoupTask(long id);

        /// <summary>
        /// 修改任务状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        int UpdateSoupTaskStatus(long id, int status);

        /// <summary>
        /// 用户完成任务记录
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<user_soup_value_his_dto> GetUserSoupValueHiss(UserSoupValueHisQuery query);

        /// <summary>
        /// 根据类型获取任务
        /// </summary>
        /// <param name="taskType"></param>
        /// <returns></returns>
        soup_task_dto GetSoupTaskByType(ETaskType taskType);

        /// <summary>
        ///app 任务列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<task_dto> GetTaskList(long userId);
        List<task_dto> GetTaskList(task_query query);
        /// <summary>
        /// APP获得任务详情（记录点击数）
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        task_dto AppGetSoupTask(long id, long userId,ETaskType type = 0);
        Task<bool> TaskRecive(long userId, ETaskType taskType, long itemId = 0, string code = "");
    }
}
